package com.jiuyin.dianjing.api.data;

import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;

/**
 * @author Administrator
 * @date 2018/1/16
 */

public class BasicResponse<T> {

    @SerializedName(value = "code", alternate = "Code")
    private int code;
    @SerializedName(value = "message", alternate = {"msg", "Msg"})
    private String msg;

    @SerializedName(value = "data", alternate = {"Data", "Item"})
    private T data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }


    @Override
    public String toString() {
        return new Gson().toJson(this);
    }
}
